package com.example.demo.thread;

import java.util.concurrent.Callable;

/**
 * @Author: xiatian
 * @CreateTime: 2021/11/11 3:55 下午
 * @Description:
 */
public class MyCallable implements Callable<String> {

    @Override
    public String call() throws Exception {
        Thread.sleep(5000);
        //返回执行当前Callable的线程名称
        return Thread.currentThread().getName();
    }
}
